package in.muton.edushare.pages.user;

import in.muton.edushare.grading.panels.CourseGradePanel;
import in.muton.edushare.grading.panels.studentGrades.StudentGradePanel;
import in.muton.edushare.wicket.models.CayenneList;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.JavascriptPackageResource;

import com.edushare.common.constants.ApplicationConstants;
import com.edushare.common.vo.CourseInstances;
import com.edushare.common.vo.Enrolments;

public class UserGrades extends UserBase {

	public UserGrades(PageParameters params) {
		super(params);
		CayenneList<CourseInstances> cInst = ud
				.getCourseInstByRole(Enrolments.STUDENT);
		cInst.add(ud.getCourseInstByRole(Enrolments.OBSERVER));
		add(JavascriptPackageResource.getHeaderContribution(
				CourseGradePanel.class, "grade.js"));
		add(new StudentGradePanel("studentGradePanel", getModel(), this));
	}

	@Override
	public String getActivePage() {
		return "CourseGrades";
	}

	@Override
	public String getPageTitle() {
		return getModel().getObject().getCompleteUserName() + " | Grades | "
				+ ApplicationConstants.APPLICATION_NAME;
	}

	@Override
	public String getUserRole() {
		return " : Grades";
	}

}
